import {
  Navigate,
  createBrowserRouter
} from "react-router-dom";
import List from '../views/article/List';
import Add from '../views/article/Add';
import Index from "../views/article/Index";

export default createBrowserRouter([
  {
    path: "/article",
    element: <Navigate to="/article/list" replace />,
  },
  {
    path: "/article",
    element: <Index />,
    children: [
      {
        index: true,
        path: "list",
        element: <List />,
      },
      {
        path: "add",
        element: <Add />,
      }
    ]
  },
]);